namespace VPSoftTestApplication.DAL
{
    public class DatabaseFactory : AbstractDatabaseFactory
    {
        private static DatabaseFactory _instance;

        public static DatabaseFactory GetInstance()
        {
            return _instance ?? (_instance = new DatabaseFactory());
        }

        public override AbstractInventoryControler InventoryControler
        {
            get { return inventoryControler ?? (inventoryControler = new InventoryControler(ConnectionString)); }
        }

        public override AbstractDocumentHeaderControler DocumentHeaderControler
        {
            get
            {
                return documentHeaderControler ?? (documentHeaderControler = new DocumentHeaderControler(ConnectionString)); 
            }
        }
    }
}

		